TDevAccX loses connection with 64-bit Matlab or Python
Tech Note: TN0961
Product: OpenDeveloper
Version: All
Date Added: 2016-01-29 (updated 2023-05-31)
Issue
When using 64-bit MATLAB 2015 and above or 64-bit Python, TDevAccX loses connection to Workbench server sporadically.
Workaround
Downgrade to 2014 or earlier version of 32-bit MATLAB
OR
Install 32-bit Python. In Anaconda Prompt:
conda create -n py38_32
conda activate py38_32
conda config --env --set subdir win-32
conda install python=3.8
pip install pywin32
example.py
from win32com.client import *
obj = Dispatch('TDevAcc.X')
print(obj.ConnectServer('Local'))
print(obj.SetTargetVal('Amp1.value', 1))
Solution
Upgrade to the Synapse recording platform, which doesn't rely on ActiveX controls to dynamically interact with the hardware during a recording.